<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String id = request.getParameter("id");
    String appid = request.getParameter("appid");
    String bizCode = request.getParameter("bizCode");
    String batchId = request.getParameter("batchId");
    String type = request.getParameter("type");
    String orgCode = request.getParameter("orgCode");
%>
<!DOCTYPE html>
<html>
<head>
    <title>审核信息</title>
    <%@ include file="../../../common/meta.jsp" %>
    <link href="${ctx}/css/page/common-win.css?t=${now}" rel="stylesheet">
    <script src="${ctx}/js/common/obj_compare.js"></script>
    <script src="${ctx}/js/plugins/jquery.ajaxfileupload-2.1.js?t=${now}"></script>
    <script src="${ctx}/js/imageview/jquery.photo.gallery.js?t=${now}"></script>
</head>
<style>
    .form-group >div{
        padding-top: 7px!important;
    }
</style>
<script>
    var idStr = '<%=id%>';
    var searchInfo = ${searchInfo};
    var typeStr = '<%=type%>';
    var appidstr = '<%=appid%>';
    var batchIdStr = '<%=batchId%>';
    var orgCodeStr = '<%=orgCode%>';
    var bizCodeStr = '<%=bizCode%>';
    var imgSrcDefault = "${ctx}/images/main/default.jpg";
</script>
<body class="gray-bg">
<div id="vue">
    <div class="myContent">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins" style="
    margin-bottom: 2px;
">
                    <table class="_tabTable">
                        <tr>
                            <td class="active" onclick="showBizOrgApp()" id="_bizOrgAppTD">服务信息</td>
                            <td onclick="showBizOrgAppFunc()" id="_bizOrgAppFuncTD">服务项信息</td>
                        </tr>
                    </table>
                    <div class="ibox-content " id="_bizOrgAppDiv">
                        <c:if test="${type =='check'.toString()}">
                            <div class="row">
                                <div class="form-group ">
                                    <label class="col-sm-2 control-label">审核结果：</label>
                                    <label class="col-sm-10 control-label-right">
                                       <c:forEach items="${checkResultTypeMap}" var="item">
                                            <c:if test="${not empty pfCheckDataLogDto && pfCheckDataLogDto.result == item.key}">
                                                ${ not empty item ? item.value :""}
                                            </c:if>
                                        </c:forEach>
                                    </label>
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group ">
                                    <label class="col-sm-2 control-label">审核说明：</label>
                                    <label class="col-sm-10 control-label-right">
                                         ${not empty pfCheckDataLogDto ? pfCheckDataLogDto.remark : ''}
                                    </label>
                                </div>
                            </div>
                        </c:if>

                        <h5><i class="fa fa-file-text"></i> 基本信息</h5>
                        <%--<c:if test="${not empty oneOrgAppInfo && not empty oneOrgAppInfo.refDataList}">
                            <c:forEach items="${oneOrgAppInfo.refDataList}" var="item">
                                <c:forEach items="${oneOrgAppInfo.bizPackageList}" var="bizItem">
                                    ${item.bizCode},${bizItem.bizCode}
                                    <br>
                                </c:forEach>
                                <br>
                            </c:forEach>
                        </c:if>--%>
                        <hr>
                        <form class="form-horizontal m-t">
                                <div class="form-group ">
                                    <label class="col-sm-2 control-label
                                    <c:if test="${oneOrgAppInfo.appid != oneBeforeOrgAppInfo.appid && oneOrgAppInfo.operateType != 'add'}">${not empty oneOrgAppInfo ? oneOrgAppInfo.operateType : ''}</c:if>">业务类型：</label>
                                    <div class="col-sm-3 control-label-right">
                                        ${not empty oneOrgAppInfo ? oneOrgAppInfo.bizName : ''}
                                    </div>
                                    <label class="col-sm-2 control-label
                                    <c:if test="${oneOrgAppInfo.refCode != oneBeforeOrgAppInfo.refCode && oneOrgAppInfo.operateType != 'add'}">${not empty oneOrgAppInfo ? oneOrgAppInfo.operateType : ''}</c:if>">关联机构：</label>
                                    <div class="col-sm-3 control-label-right">
                                        ${not empty oneOrgAppInfo ? oneOrgAppInfo.orgName : ''}
                                    </div>
                                </div>
                             <hr class="hr_board" />
                                <div class="form-group">
                                    <label class="col-sm-2 control-label
                                    <c:if test="${oneOrgAppInfo.isvPid != oneBeforeOrgAppInfo.isvPid && oneOrgAppInfo.operateType != 'add'}">${not empty oneOrgAppInfo ? oneOrgAppInfo.operateType : ''}</c:if>">服务商：</label>
                                    <div class="col-sm-3 control-label-right">
                                        ${not empty oneOrgAppInfo ? oneOrgAppInfo.isvName : ''}
                                    </div>
                                </div>
                             <hr class="hr_board" />
                                <div class="form-group">
                                    <label class="col-sm-2 control-label
                                    <c:if test="${oneOrgAppInfo.sortNum != oneBeforeOrgAppInfo.sortNum && oneOrgAppInfo.operateType != 'add'}">${not empty oneOrgAppInfo ? oneOrgAppInfo.operateType : ''}</c:if>">机构排序：</label>
                                    <div class="col-sm-9 control-label-right">
                                        ${not empty oneOrgAppInfo ? oneOrgAppInfo.sortNum : ''}
                                    </div>
                                </div>
                            <hr class="hr_board" />
                            <div class="form-group ">
                                <label class="col-sm-2 control-label
                                    <c:if test="${oneOrgAppInfo.serviceAgreement != oneBeforeOrgAppInfo.serviceAgreement && oneOrgAppInfo.operateType != 'add'}">${not empty oneOrgAppInfo ? oneOrgAppInfo.operateType : ''}</c:if>">服务协议：</label>
                                <div class="col-sm-9 control-label-right">
                                    <iframe style="width: 100%" srcdoc='<html><body>${oneOrgAppInfo.serviceAgreement}</body></html>'></iframe>
                                </div>
                            </div>
                             <hr class="hr_board" />
                                <div class="form-group ">
                                    <label class="col-sm-2 control-label
                                    <c:if test="${oneOrgAppInfo.remark != oneBeforeOrgAppInfo.remark && oneOrgAppInfo.operateType != 'add'}">${not empty oneOrgAppInfo ? oneOrgAppInfo.operateType : ''}</c:if>">备注：</label>
                                    <div class="col-sm-9 control-label-right">
                                        ${not empty oneOrgAppInfo ? oneOrgAppInfo.remark : ''}
                                    </div>
                                </div>
                        </form>
                    </div>
                    <div class="ibox-content" id="_bizOrgAppFuncDiv" hidden="hidden">
                        <c:if test="${type =='check'.toString()}">
                            <div class="row">
                                <div class="form-group ">
                                    <label class="col-sm-2 control-label">审核结果：</label>
                                    <label class="col-sm-10 control-label-right">
                                        <c:forEach items="${checkResultTypeMap}" var="item">
                                            <c:if test="${not empty pfCheckDataLogDto && pfCheckDataLogDto.result == item.key}">
                                                ${ not empty item ? item.value :""}
                                            </c:if>
                                        </c:forEach>
                                    </label>
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group ">
                                    <label class="col-sm-2 control-label">审核说明：</label>
                                    <label class="col-sm-10 control-label-right" >
                                        ${not empty pfCheckDataLogDto ? pfCheckDataLogDto.remark : ''}
                                    </label>
                                </div>
                            </div>
                            <br>
                        </c:if>

                        <form class="form-horizontal m-t">
                            <c:if test="${not empty oneOrgAppInfo && not empty oneOrgAppInfo.refDataList}">
                                <c:forEach items="${oneOrgAppInfo.refDataList}" var="item">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label
                                            <c:if test="${item.bizCode != item.oldBizAppDto.bizCode && item.operateType != 'add'}">${item.operateType}</c:if>">服务项名称：</label>
                                            <div class="col-sm-3">
                                                ${item.bizName}
                                            </div>
                                            <label class="col-sm-2 control-label
                                            <c:if test="${item.sortNum != item.oldBizAppDto.sortNum && item.operateType != 'add'}">${item.operateType}</c:if>">排序：</label>
                                            <div class="col-sm-3">
                                                ${item.sortNum}
                                            </div>
                                        </div>
                                        <hr class="hr_board" />
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label
                                        <c:if test="${item.appLinkUrl != item.oldBizAppDto.appLinkUrl && item.operateType != 'add'}">${item.operateType}</c:if> ">服务地址(H5)：</label>
                                        <div class="col-sm-3">
                                            ${item.appLinkUrl}
                                        </div>
                                    </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label
                                            <c:if test="${item.validDay != item.oldBizAppDto.validDay && item.operateType != 'add'}">${item.operateType}</c:if>"><span style="color: red;">*</span>服务效期：</label>
                                            <div class="col-sm-3">
                                                ${item.validDay}
                                            </div>
                                        </div>
                                    <h5><i class="fa fa-file-text"></i> 服务包</h5>
                                    <hr>
                                <c:set value="${item.bizCode}" var="checkBizCode" />
                                <c:forEach items="${oneOrgAppInfo.bizPackageList}" var="bizItem">
                                    <c:if test="${checkBizCode == bizItem.bizCode}">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label
                                        <c:if test=" ${(bizItem.packageName != bizItem.oldBizPackage.packageName && bizItem.operateType != 'add') || bizItem.operateType == 'del'}">${bizItem.operateType}</c:if>"><span style="color: red;">*</span>服务包名称：</label>
                                        <div class="col-sm-3">
                                            ${bizItem.packageName}
                                        </div>
                                        <label class="col-sm-2 control-label
                                        <c:if test=" ${(bizItem.sortNum != bizItem.oldBizPackage.sortNum && bizItem.operateType != 'add') || bizItem.operateType == 'del'}">${bizItem.operateType}</c:if>"><span style="color: red;">*</span>排序：</label>
                                        <div class="col-sm-3">
                                            ${bizItem.sortNum}
                                        </div>
                                    </div>
                                    <hr class="hr_board" />

                                    <div class="form-group">
                                        <label class="col-sm-2 control-label
                                        <c:if test="${(bizItem.summary != bizItem.oldBizPackage.summary && bizItem.operateType != 'add') || bizItem.operateType == 'del'}">${bizItem.operateType}</c:if>"><span style="color: red;">*</span>简介：</label>
                                        <div class="col-sm-9">
                                            ${bizItem.summary}
                                        </div>
                                    </div>
                                    <hr class="hr_board" />

                                    <div class="form-group">
                                        <label class="col-sm-2 control-label
                                        <c:if test="${(bizItem.packageContent != bizItem.oldBizPackage.packageContent && bizItem.operateType != 'add') || bizItem.operateType == 'del'}">${bizItem.operateType}</c:if>"><span style="color: red;">*</span>服务说明：</label>
                                        <div class="col-sm-9">
                                            <iframe style="width: 100%" srcdoc='<html><body>${bizItem.packageContent}</body></html>'></iframe>
                                        </div>
                                    </div>
                                    <hr class="hr_board" />

                                    <div class="form-group">
                                        <label class="col-sm-2 control-label
                                        <c:if test="${(bizItem.isRequired != bizItem.oldBizPackage.isRequired && bizItem.operateType != 'add') || bizItem.operateType == 'del'}">${bizItem.operateType}</c:if>"><span style="color: red;">*</span>是否必备：</label>
                                        <div class="col-sm-3">
                                            <c:forEach items="${yesOrNoEnumMap}" var="item">
                                                <c:if test="${not empty bizItem && bizItem.isRequired == item.key}">
                                                    ${ not empty item ? item.value :""}
                                                </c:if>
                                            </c:forEach>
                                            <%--${bizItem.isRequired}--%>
                                        </div>
                                    </div>
                                    <hr class="hr_board" />
                                    </c:if>
                                </c:forEach>
                                    <hr>
                                    <hr>
                                </c:forEach>
                            </c:if>

                        </form>
                    </div>
                </div>
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <div class="" id="_btnDiv" style="
    margin-bottom: 30px;
">
                            <div class="col-sm-3 col-sm-offset-3">
                                <c:if test="${type !='check'.toString()}">
                                <c:choose>
                                    <c:when test="${ IsShowQrCode == 'N'.toString() }">
                                        <input type="button" class="btn btn-primary" onclick="toPass()" value="通过">
                                        <input type="button" class="btn btn-danger" onclick="doUnPublish()" value="不通过">
                                    </c:when>
                                    <c:otherwise>
                                            <input type="button" class="btn btn-primary" onclick="openQRCode()" value="扫码预览">
                                    </c:otherwise>
                                </c:choose>
                                </c:if>
                                <input type="button" class="btn btn-white" onclick="doClose()" value="返回">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<div id="publishApp" class="modal" tabindex="-1" role="dialog" data-backdrop="static" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content animated bounceInRight">
            <div class="modal-header text-center">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4>扫码验证</h4>
            </div>
            <div class="modal-body modal-body-height">
                <div class="row">
                    <div class="col-sm-12 text-center"><image class="login-scancode" id="scanCode" style="height: anto;width: 250px" onclick="chageQRCode();"/></div>
                    <div class="col-sm-12 text-center">提示：验证发布内容准确性，上线更放心</div>
                    <div class="col-sm-12 text-center">二维码有效期为<span id="_validNum"></span>秒</div>
                </div>
            </div>
            <div class="modal-footer" style="text-align: center;">
                <button class="btn btn-primary" onclick="doPublish()">通过</button>
                <button class="btn btn-danger" onclick="doUnPublish()">不通过</button>
                <button class="btn btn-white" onclick="$('#publishApp').modal('hide')">取消</button>
            </div>
        </div>
    </div>
</div>

<div id="unPublishAppWin" class="modal" tabindex="-1" role="dialog" data-backdrop="static" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content animated bounceInRight">
            <div class="modal-header text-center">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4>审核不通过</h4>
            </div>
            <div class="modal-body modal-body-height">
                <div class="row">
                    <div class="col-sm-1 text-right error"></div>
                    <div class="col-sm-11 text-left"><span style="color: red">*</span>请输入审核不通过原因（必填）：</div>
                </div>
                <div class="row">
                    <div class="col-sm-1 text-right"></div>
                    <div class="col-sm-11 text-left">
                            <textarea id="error_textarea" name="error_textarea" cols="30" rows="10"
                                      class="form-control"></textarea>
                    </div>
                </div>
            </div>
            <div class="modal-footer" style="text-align: center;">
                <button class="btn btn-primary" onclick="doUnPublishApp()">确定</button>
                <button class="btn btn-white" onclick="$('#unPublishAppWin').modal('hide')">返回</button>
            </div>
        </div>
    </div>
</div>

<script src="${ctx}/js/check/orgApp/win/checkingCheckOrgAppMgr.js?time=${now}"></script>
</body>
</html>
